<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>border实现加号</title>
    <style>
        div{
            width:150px;
            height:150px;
            border:3px dashed;
            color:#ccc;
            position: relative;
        }
        div:before{
            content: '';
            border-top:5px solid;
            width:40px;
            height:20px;
            position: absolute;
            left:35%;
            top:45%;
        }
        div:after{
            content: '';
            border-left: 5px  solid;
            width:20px;
            height:40px;
            position: absolute;
            left:45%;
            top:35%;
        }
        div:hover{
            color:green;
        }
    </style>
</head>
<body>
<div></div>
</body>
</html>